package com.quanyan.pay.web.request;

import com.quanyan.BaseRequest;
import com.quanyan.orderpay.request.ReqPayInfo;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author songzj
 * @date 16/5/26-14:24
 */
public class ReqPreOrder extends BaseRequest {


    private static final long serialVersionUID = 281417658589131340L;

    @NotNull(message = "用户ID不能为空")
    private Integer uid; //用户UID

    @Size(max = 50, message = "最多50个字符")
    private String subject; //订单描述

    @Size(max = 200, message = "最多200个字符")
    private String describe; //订单详情描述

    @Size(max = 100, message = "最多100个字符")
    private String payNote; //支付备注信息.

    @NotNull(message = "订单金额不能为空")
    @Min(value = 0, message = "订单金额超过范围")
    private BigDecimal orderAmount; //订单金额

    @Min(value = 5, message = "订单超时时间超过范围")
    private Integer payTimeOut; //支付超时时间

    @NotNull
    private String orderNo; //订单唯一编号.

    @NotNull
    private String outTradeNo; //业务系统流水号

    private String mchId; //支付账号商户ID. 发起活动的公司账户ID.

    private String productId; //产品ID. 可选.

    private String buyerAccount; //用户微信公众号OpenId.

    private String returnURL; //支付成功后, 跳转到页面.

    private String showURLForH5;// 商品展示网址 用户付款中途退出返回商户网站的地址。(支付宝)

    private String returnUrlForH5; //页面跳转同步通知页面路径 支付宝处理完请求后，当前页面自动跳转到商户网站里指定页面的http路径。（支付宝）

    private String extraParam; //拓展字段, 原样返回.

    private String userClientIp; //用户终端IP地址.

    @NotEmpty(message = "最少选择一种支付方式")
    private List<ReqPayInfo> reqPayInfos; //支付方式

    private String authCode;

    //鸟蛋使用 收款方
    private String eggReceiver;

    //鸟蛋使用 备注
    private String eggInfo;

    public String getShowURLForH5() {
        return showURLForH5;
    }

    public void setShowURLForH5(String showURLForH5) {
        this.showURLForH5 = showURLForH5;
    }

    public String getReturnUrlForH5() {
        return returnUrlForH5;
    }

    public void setReturnUrlForH5(String returnUrlForH5) {
        this.returnUrlForH5 = returnUrlForH5;
    }

    public String getAuthCode() {
        return authCode;
    }

    public void setAuthCode(String authCode) {
        this.authCode = authCode;
    }

    public String getEggReceiver() {
        return eggReceiver;
    }

    public void setEggReceiver(String eggReceiver) {
        this.eggReceiver = eggReceiver;
    }

    public String getEggInfo() {
        return eggInfo;
    }

    public void setEggInfo(String eggInfo) {
        this.eggInfo = eggInfo;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public BigDecimal getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(BigDecimal orderAmount) {
        this.orderAmount = orderAmount;
    }

    public Integer getPayTimeOut() {
        return payTimeOut;
    }

    public void setPayTimeOut(Integer payTimeOut) {
        this.payTimeOut = payTimeOut;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getReturnURL() {
        return returnURL;
    }

    public void setReturnURL(String returnURL) {
        this.returnURL = returnURL;
    }

    public String getExtraParam() {
        return extraParam;
    }

    public void setExtraParam(String extraParam) {
        this.extraParam = extraParam;
    }

    public List<ReqPayInfo> getReqPayInfos() {
        return reqPayInfos;
    }

    public void setReqPayInfos(List<ReqPayInfo> reqPayInfos) {
        this.reqPayInfos = reqPayInfos;
    }

    public String getUserClientIp() {
        return userClientIp;
    }

    public void setUserClientIp(String userClientIp) {
        this.userClientIp = userClientIp;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getBuyerAccount() {
        return buyerAccount;
    }

    public void setBuyerAccount(String buyerAccount) {
        this.buyerAccount = buyerAccount;
    }

    public String getPayNote() {
        return payNote;
    }

    public void setPayNote(String payNote) {
        this.payNote = payNote;
    }

    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }
}
